/*******************************************************************************
 * @file Assert.h
 * Definition of assertions macros
 * 
 * @author mk
 * @date 03/01/2008 13:50:21
 * @version 0.1
 ******************************************************************************/

#ifndef ASSERT_H_INCLUDED__
#define ASSERT_H_INCLUDED__

#ifdef __ASSERT_POINTER
#warning "Macro __ASSERT_POINTER will be redefined!"
#endif
#define __ASSERT_POINTER(p) if (!p) { throw std::runtime_error("Nullpointer exception"); }

#ifdef __ASSERT_ALWAYS
#warning "Macro __ASSERT_ALWAYS will be redefined!"
#endif
#define __ASSERT_ALWAYS(e, s) if (e) { s; }

#ifdef __ASSERT_DEBUG
#warning "Macro __ASSERT_DEBUG will be redefined!"
#endif
#ifdef _DEBUG
#define __ASSERT_DEBUG(e, s) if (e)	{ s; }
#else
#define __ASSERT_DEBUG(e, s)
#endif

#ifdef __ASSERT_RELEASE
#warning "Macro __ASSERT_RELEASE will be redefined!"
#endif
#ifdef _DEBUG
#define __ASSERT_RELEASE(e, s)
#else
#define __ASSERT_RELEASE(e, s) if (e) { s; }
#endif

#endif // ASSERT_H_INCLUDED__